/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package GUI;

import DAO.*;
import DTO.*;
import java.util.List;

import java.util.List;
import java.util.ArrayList;
import java.util.Date;
import java.util.regex.*;

import javax.swing.JOptionPane;
import javax.swing.table.DefaultTableModel;





import java.awt.event.*;

import java.sql.*;
import java.text.SimpleDateFormat;
import java.util.HashMap;
import java.util.Map;

import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.DefaultComboBoxModel;
import javax.swing.JFileChooser;
import javax.swing.JFrame;
import net.sf.jasperreports.engine.JRException;
import net.sf.jasperreports.engine.JasperCompileManager;
import net.sf.jasperreports.engine.JasperFillManager;
import net.sf.jasperreports.engine.JasperPrint;
import net.sf.jasperreports.engine.JasperReport;
import net.sf.jasperreports.engine.data.JRBeanCollectionDataSource;
import net.sf.jasperreports.swing.JRViewer;

/**
 *
 * @author Luis Olave 10
 */
public class ModificacionGarantiaAutomotriz extends javax.swing.JFrame {

    Connection conexion, conexion2;
    Statement st, st2;
    ResultSet rs, rs2;
    DefaultComboBoxModel modeloCombo6 = new DefaultComboBoxModel();
    DefaultComboBoxModel modeloCombo7 = new DefaultComboBoxModel();
    usuarioDTO user;
    garantiasDAO reg = new garantiasDAO();
    String fechaModi = "";

    /**
     * Creates new form ModificacionGarantiaAutomotriz
     */
    public ModificacionGarantiaAutomotriz(usuarioDTO user) {
        this.user = user;
        initComponents();
        chkFolioModiAuto.setSelected(true);
        pnlBuscarPatente.setVisible(false);
        cargarItemsComboBoxSucursal();
        cargarItemsComboBoxMoneda();
        cargarItemsComboBoxTipoGarantia();
        this.btnActModAuto.setVisible(false);
        this.txtPatenteModAuto.setEditable(false);
        this.setDefaultCloseOperation(this.EXIT_ON_CLOSE);
        cargarMarcaAuto();
        this.cmbMarcaModAuto.addActionListener(new ActionListener()
        {
            public void actionPerformed(ActionEvent arg0) {
                cargarModeloAuto((String) cmbMarcaModAuto.getSelectedItem().toString());
            }
        });
        
    }

    private void cargarModeloAuto(String marca)
    {   
           this.cmbModeloModiAuto.removeAllItems();
           this.cmbModeloModiAuto.addItem("(SELECCIONE)");
           ArrayList<modeloDTO> lista = garantiasDAO.CargarModeloAuto(marca);
           int size = lista.size();
           for(int i=0; i<size; i++)
           {
               this.cmbModeloModiAuto.addItem(lista.get(i).getNom_modelo());
               
           }
    }
    
    private void cargarMarcaAuto()
    {
        ArrayList<marcaDTO> lista = garantiasDAO.CargarMarcaAuto();
        int size = lista.size();
        for(int i= 0; i<size; i++ )
        {
            this.cmbMarcaModAuto.addItem(lista.get(i).getNom_marca());
        }
    }

    private void cargarItemsComboBoxSucursal() {
        List<sucursalDTO> ListaSucursal = CCSucursal.listarItemSucursal();
        if (ListaSucursal != null) {
            int size = ListaSucursal.size();
            for (int i = 0; i < size; i++) {
                this.cmbSucursalModAuto.addItem(ListaSucursal.get(i).getNom_sucursal());
            }
        }
    }

    private void cargarItemsComboBoxMoneda() {
        List<monedaDTO> ListaMoneda = CCMoneda.listarItemMoneda();
        if (ListaMoneda != null) {
            int size = ListaMoneda.size();
            for (int i = 0; i < size; i++) {
                this.cmbMonedaModAuto.addItem(ListaMoneda.get(i).getNom_moneda());
            }
        }
    }

    private void cargarItemsComboBoxTipoGarantia() {
        List<tipoGarantiaDTO> ListaTipoGtia = CCTipoGarantia.listarItemTipoGarantia();
        if (ListaTipoGtia != null) {
            int size = ListaTipoGtia.size();
            for (int i = 0; i < size; i++) {
                this.cmbTipoGarantiaModAuto.addItem(ListaTipoGtia.get(i).getTipo_garantia());
            }
        }
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        buttonGroup1 = new javax.swing.ButtonGroup();
        lblLogo = new javax.swing.JLabel();
        lblIngresoGaraAuto = new javax.swing.JLabel();
        jTabbedPane1 = new javax.swing.JTabbedPane();
        jPanel2 = new javax.swing.JPanel();
        pnlBuscarPatente = new javax.swing.JPanel();
        jLabel30 = new javax.swing.JLabel();
        txtPatenteModiAuto = new javax.swing.JTextField();
        btnPatenteModiAuto = new javax.swing.JButton();
        pnlDatosPersoGara = new javax.swing.JPanel();
        jPanel8 = new javax.swing.JPanel();
        jLabel36 = new javax.swing.JLabel();
        jLabel37 = new javax.swing.JLabel();
        jLabel39 = new javax.swing.JLabel();
        jLabel40 = new javax.swing.JLabel();
        txtNombreModifiAuto = new javax.swing.JTextField();
        txtApellMatModiAuto = new javax.swing.JTextField();
        txtApellPatModiAuto = new javax.swing.JTextField();
        txtRutModiAuto = new javax.swing.JTextField();
        btnMenuPrincipal = new javax.swing.JButton();
        chkPatenteModiAuto = new javax.swing.JCheckBox();
        chkFolioModiAuto = new javax.swing.JCheckBox();
        pnlBuscarFolio = new javax.swing.JPanel();
        jLabel31 = new javax.swing.JLabel();
        txtFolioModiAuto = new javax.swing.JTextField();
        btnFolioModiAuto = new javax.swing.JButton();
        jPanel3 = new javax.swing.JPanel();
        pnlDescripGarantia = new javax.swing.JPanel();
        jScrollPane3 = new javax.swing.JScrollPane();
        txtOtroComentarioModAuto = new javax.swing.JTextArea();
        jScrollPane4 = new javax.swing.JScrollPane();
        txtDescripcionModiAuto = new javax.swing.JTextArea();
        lblDescripcion = new javax.swing.JLabel();
        jPanel4 = new javax.swing.JPanel();
        pnlCreacionGaraAuto = new javax.swing.JPanel();
        jPanel1 = new javax.swing.JPanel();
        lblSucursal = new javax.swing.JLabel();
        lblDireccion = new javax.swing.JLabel();
        lblMarca = new javax.swing.JLabel();
        lblPatente = new javax.swing.JLabel();
        lblNumChasis = new javax.swing.JLabel();
        FechCreacion = new javax.swing.JLabel();
        FechUltDebito = new javax.swing.JLabel();
        txtDireccionModAuto = new javax.swing.JTextField();
        txtNumChasisModAuto = new javax.swing.JTextField();
        txtPatenteModAuto = new javax.swing.JTextField();
        lblFechUltTasacion = new javax.swing.JLabel();
        lblNumMotor = new javax.swing.JLabel();
        txtNumMotorModiAuto = new javax.swing.JTextField();
        txtAñoModAuto = new javax.swing.JTextField();
        lblAño = new javax.swing.JLabel();
        lblMoneda = new javax.swing.JLabel();
        jcFechUltDebAuto = new com.toedter.calendar.JDateChooser();
        jcFechUltTasacAprobAuto = new com.toedter.calendar.JDateChooser();
        txtFechaCreacion = new javax.swing.JTextField();
        cmbSucursalModAuto = new javax.swing.JComboBox();
        cmbMarcaModAuto = new javax.swing.JComboBox();
        cmbMonedaModAuto = new javax.swing.JComboBox();
        jPanel5 = new javax.swing.JPanel();
        lblTipoGarantia = new javax.swing.JLabel();
        lblModelo = new javax.swing.JLabel();
        lblNumRegPrenda = new javax.swing.JLabel();
        lblFechExtincion = new javax.swing.JLabel();
        lblFechUltRevaluo = new javax.swing.JLabel();
        FechUltCredito = new javax.swing.JLabel();
        txtNumRegPrendaModAuto = new javax.swing.JTextField();
        jcFechExtincionModAuto = new com.toedter.calendar.JDateChooser();
        jcFechUltRevaluoModAuto = new com.toedter.calendar.JDateChooser();
        jcFechUltCreditoModAuto = new com.toedter.calendar.JDateChooser();
        lblFechModifica = new javax.swing.JLabel();
        jcFechModificaAprobAuto = new com.toedter.calendar.JDateChooser();
        cmbTipoGarantiaModAuto = new javax.swing.JComboBox();
        cmbModeloModiAuto = new javax.swing.JComboBox();
        jPanel9 = new javax.swing.JPanel();
        lblArchivo = new javax.swing.JLabel();
        txtArchivoModiAuto = new javax.swing.JTextField();
        btnExaminarModAuto = new javax.swing.JButton();
        btnAdjuntarModiAuto = new javax.swing.JButton();
        btnMenuPricModAuto = new javax.swing.JButton();
        btnActModAuto = new javax.swing.JButton();
        jPanel11 = new javax.swing.JPanel();
        txtEstadoActualAutomotriz = new javax.swing.JTextField();
        jPanelCambiandoEstadoActual = new javax.swing.JPanel();
        txtCambiandoEstadoActualAutomotriz = new javax.swing.JTextField();
        jPanel6 = new javax.swing.JPanel();
        jPanel7 = new javax.swing.JPanel();
        jScrollPane1 = new javax.swing.JScrollPane();
        tbSalidaImprimirPatente = new javax.swing.JTable();
        jPanel10 = new javax.swing.JPanel();
        txtBuscarPatenteImprimir = new javax.swing.JTextField();
        btnBuscarPatnteImprimir = new javax.swing.JButton();
        btnImprimirPatente = new javax.swing.JButton();
        btnMenuPrincipalAutomotriz = new javax.swing.JButton();
        jLabel1 = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("MODIFICACIÓN GARANTÍA AUTOMOTRIZ");
        setResizable(false);

        lblLogo.setIcon(new javax.swing.ImageIcon(getClass().getResource("/IMAGE/logo.JPG"))); // NOI18N

        lblIngresoGaraAuto.setFont(new java.awt.Font("Century Gothic", 1, 18)); // NOI18N
        lblIngresoGaraAuto.setText("MODIFICACIÓN GARANTÍA AUTOMOTRIZ");

        jTabbedPane1.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N

        pnlBuscarPatente.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "INGRESE PATENTE", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Century Gothic", 1, 10), java.awt.Color.blue)); // NOI18N

        jLabel30.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel30.setText("PATENTE");

        btnPatenteModiAuto.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        btnPatenteModiAuto.setText("BUSCAR");
        btnPatenteModiAuto.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnPatenteModiAutoActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout pnlBuscarPatenteLayout = new javax.swing.GroupLayout(pnlBuscarPatente);
        pnlBuscarPatente.setLayout(pnlBuscarPatenteLayout);
        pnlBuscarPatenteLayout.setHorizontalGroup(
            pnlBuscarPatenteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlBuscarPatenteLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel30)
                .addGap(18, 18, 18)
                .addGroup(pnlBuscarPatenteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(txtPatenteModiAuto)
                    .addComponent(btnPatenteModiAuto, javax.swing.GroupLayout.DEFAULT_SIZE, 100, Short.MAX_VALUE))
                .addContainerGap(52, Short.MAX_VALUE))
        );
        pnlBuscarPatenteLayout.setVerticalGroup(
            pnlBuscarPatenteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlBuscarPatenteLayout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(pnlBuscarPatenteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel30)
                    .addComponent(txtPatenteModiAuto, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnPatenteModiAuto)
                .addContainerGap())
        );

        pnlDatosPersoGara.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "DATOS PERSONALES GARANTE", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Century Gothic", 1, 10), java.awt.Color.blue)); // NOI18N

        jLabel36.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel36.setText("RUT");

        jLabel37.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel37.setText("APELLIDO PATERNO");

        jLabel39.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel39.setText("APELLIDO MATERNO");

        jLabel40.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel40.setText("NOMBRE");

        txtNombreModifiAuto.setBackground(new java.awt.Color(255, 255, 102));
        txtNombreModifiAuto.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        txtNombreModifiAuto.setEnabled(false);

        txtApellMatModiAuto.setBackground(new java.awt.Color(255, 255, 102));
        txtApellMatModiAuto.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        txtApellMatModiAuto.setEnabled(false);

        txtApellPatModiAuto.setBackground(new java.awt.Color(255, 255, 102));
        txtApellPatModiAuto.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        txtApellPatModiAuto.setEnabled(false);

        txtRutModiAuto.setBackground(new java.awt.Color(255, 255, 102));
        txtRutModiAuto.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        txtRutModiAuto.setEnabled(false);

        javax.swing.GroupLayout jPanel8Layout = new javax.swing.GroupLayout(jPanel8);
        jPanel8.setLayout(jPanel8Layout);
        jPanel8Layout.setHorizontalGroup(
            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel8Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel37)
                    .addComponent(jLabel36))
                .addGap(18, 18, 18)
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(txtRutModiAuto, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtApellPatModiAuto, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 60, Short.MAX_VALUE)
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel39)
                    .addComponent(jLabel40))
                .addGap(18, 18, 18)
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(txtNombreModifiAuto, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtApellMatModiAuto, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(196, 196, 196))
        );
        jPanel8Layout.setVerticalGroup(
            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel8Layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel36)
                    .addComponent(txtRutModiAuto, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel40)
                    .addComponent(txtNombreModifiAuto, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel37)
                    .addComponent(txtApellPatModiAuto, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel39)
                    .addComponent(txtApellMatModiAuto, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );

        javax.swing.GroupLayout pnlDatosPersoGaraLayout = new javax.swing.GroupLayout(pnlDatosPersoGara);
        pnlDatosPersoGara.setLayout(pnlDatosPersoGaraLayout);
        pnlDatosPersoGaraLayout.setHorizontalGroup(
            pnlDatosPersoGaraLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlDatosPersoGaraLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel8, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );
        pnlDatosPersoGaraLayout.setVerticalGroup(
            pnlDatosPersoGaraLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlDatosPersoGaraLayout.createSequentialGroup()
                .addGap(0, 0, Short.MAX_VALUE)
                .addComponent(jPanel8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
        );

        btnMenuPrincipal.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        btnMenuPrincipal.setText("MENÚ PRINCIPAL");
        btnMenuPrincipal.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnMenuPrincipalActionPerformed(evt);
            }
        });

        buttonGroup1.add(chkPatenteModiAuto);
        chkPatenteModiAuto.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        chkPatenteModiAuto.setText("BUSCAR POR PATENTE");
        chkPatenteModiAuto.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                chkPatenteModiAutoActionPerformed(evt);
            }
        });

        buttonGroup1.add(chkFolioModiAuto);
        chkFolioModiAuto.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        chkFolioModiAuto.setText("BUSCAR POR N° FOLIO");
        chkFolioModiAuto.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                chkFolioModiAutoActionPerformed(evt);
            }
        });

        pnlBuscarFolio.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "INGRESE N° FOLIO", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Century Gothic", 1, 10), java.awt.Color.blue)); // NOI18N

        jLabel31.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel31.setText("N° FOLIO");

        btnFolioModiAuto.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        btnFolioModiAuto.setText("BUSCAR");
        btnFolioModiAuto.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnFolioModiAutoActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout pnlBuscarFolioLayout = new javax.swing.GroupLayout(pnlBuscarFolio);
        pnlBuscarFolio.setLayout(pnlBuscarFolioLayout);
        pnlBuscarFolioLayout.setHorizontalGroup(
            pnlBuscarFolioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlBuscarFolioLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel31)
                .addGap(18, 18, 18)
                .addGroup(pnlBuscarFolioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(txtFolioModiAuto)
                    .addComponent(btnFolioModiAuto, javax.swing.GroupLayout.DEFAULT_SIZE, 100, Short.MAX_VALUE))
                .addContainerGap(47, Short.MAX_VALUE))
        );
        pnlBuscarFolioLayout.setVerticalGroup(
            pnlBuscarFolioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlBuscarFolioLayout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(pnlBuscarFolioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel31)
                    .addComponent(txtFolioModiAuto, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnFolioModiAuto)
                .addContainerGap())
        );

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addComponent(btnMenuPrincipal, javax.swing.GroupLayout.PREFERRED_SIZE, 147, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
                        .addGap(0, 142, Short.MAX_VALUE)
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(pnlBuscarFolio, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(chkFolioModiAuto))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(chkPatenteModiAuto)
                            .addComponent(pnlBuscarPatente, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(147, 147, 147))))
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addGap(25, 25, 25)
                .addComponent(pnlDatosPersoGara, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addGap(21, 21, 21)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(chkPatenteModiAuto)
                    .addComponent(chkFolioModiAuto))
                .addGap(7, 7, 7)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addComponent(pnlBuscarPatente, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(pnlBuscarFolio, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addGap(18, 18, 18)
                .addComponent(pnlDatosPersoGara, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 109, Short.MAX_VALUE)
                .addComponent(btnMenuPrincipal)
                .addGap(63, 63, 63))
        );

        jTabbedPane1.addTab("INFO. GARANTE", jPanel2);

        pnlDescripGarantia.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "DESCRIPCIÓN GARANTIA", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Century Gothic", 1, 10), java.awt.Color.blue)); // NOI18N

        txtOtroComentarioModAuto.setColumns(20);
        txtOtroComentarioModAuto.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        txtOtroComentarioModAuto.setRows(5);
        txtOtroComentarioModAuto.setToolTipText("");
        jScrollPane3.setViewportView(txtOtroComentarioModAuto);

        txtDescripcionModiAuto.setBackground(new java.awt.Color(255, 255, 102));
        txtDescripcionModiAuto.setColumns(20);
        txtDescripcionModiAuto.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        txtDescripcionModiAuto.setRows(5);
        txtDescripcionModiAuto.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        txtDescripcionModiAuto.setEnabled(false);
        jScrollPane4.setViewportView(txtDescripcionModiAuto);

        lblDescripcion.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        lblDescripcion.setText("DESCRIPCIÓN");

        javax.swing.GroupLayout pnlDescripGarantiaLayout = new javax.swing.GroupLayout(pnlDescripGarantia);
        pnlDescripGarantia.setLayout(pnlDescripGarantiaLayout);
        pnlDescripGarantiaLayout.setHorizontalGroup(
            pnlDescripGarantiaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlDescripGarantiaLayout.createSequentialGroup()
                .addGap(70, 70, 70)
                .addComponent(lblDescripcion)
                .addGap(18, 18, 18)
                .addGroup(pnlDescripGarantiaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jScrollPane4, javax.swing.GroupLayout.DEFAULT_SIZE, 586, Short.MAX_VALUE)
                    .addComponent(jScrollPane3))
                .addContainerGap())
        );
        pnlDescripGarantiaLayout.setVerticalGroup(
            pnlDescripGarantiaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlDescripGarantiaLayout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(pnlDescripGarantiaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(lblDescripcion)
                    .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 89, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(31, 31, 31)
                .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(250, 250, 250))
        );

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(pnlDescripGarantia, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(pnlDescripGarantia, javax.swing.GroupLayout.PREFERRED_SIZE, 359, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(97, Short.MAX_VALUE))
        );

        jTabbedPane1.addTab("DESCRIP. GARANTÍA", jPanel3);

        jPanel4.setPreferredSize(new java.awt.Dimension(815, 600));

        pnlCreacionGaraAuto.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "MODIFICACIÓN GARANTÍA AUTOMOTRIZ", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Century Gothic", 1, 10), java.awt.Color.blue)); // NOI18N

        lblSucursal.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        lblSucursal.setText("SUCURSAL");

        lblDireccion.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        lblDireccion.setText("DIRECCIÓN (CRÉDITO)");

        lblMarca.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        lblMarca.setText("MARCA");

        lblPatente.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        lblPatente.setText("PATENTE");

        lblNumChasis.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        lblNumChasis.setText("N° CHASIS");

        FechCreacion.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        FechCreacion.setText("FECHA CREACIÓN");

        FechUltDebito.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        FechUltDebito.setText("FECHA ÚLT. DEBITO");

        lblFechUltTasacion.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        lblFechUltTasacion.setText("FECHA ÚLT. TASACIÓN");

        lblNumMotor.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        lblNumMotor.setText("N° MOTOR");

        lblAño.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        lblAño.setText("AÑO");

        lblMoneda.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        lblMoneda.setText("MONEDA");

        txtFechaCreacion.setEditable(false);
        txtFechaCreacion.setBackground(new java.awt.Color(255, 255, 0));

        cmbSucursalModAuto.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "(SELECCIONE)" }));

        cmbMarcaModAuto.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "(SELECCIONE)" }));

        cmbMonedaModAuto.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "(SELECCIONE)" }));

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(lblDireccion)
                            .addComponent(FechUltDebito)
                            .addComponent(FechCreacion)
                            .addComponent(lblNumChasis)
                            .addComponent(lblPatente)
                            .addComponent(lblMarca)
                            .addComponent(lblSucursal))
                        .addGap(19, 19, 19)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jcFechUltDebAuto, javax.swing.GroupLayout.DEFAULT_SIZE, 159, Short.MAX_VALUE)
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                    .addComponent(txtDireccionModAuto, javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(txtPatenteModAuto, javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(txtNumChasisModAuto, javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(txtFechaCreacion, javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(cmbSucursalModAuto, 0, 159, Short.MAX_VALUE)
                                    .addComponent(cmbMarcaModAuto, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                                .addGap(0, 0, Short.MAX_VALUE))))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(lblFechUltTasacion)
                            .addComponent(lblMoneda)
                            .addComponent(lblAño)
                            .addComponent(lblNumMotor))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jcFechUltTasacAprobAuto, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                    .addComponent(txtAñoModAuto, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 159, Short.MAX_VALUE)
                                    .addComponent(txtNumMotorModiAuto, javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(cmbMonedaModAuto, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                                .addGap(0, 0, Short.MAX_VALUE)))))
                .addContainerGap())
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap(12, Short.MAX_VALUE)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblSucursal)
                    .addComponent(cmbSucursalModAuto, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblDireccion)
                    .addComponent(txtDireccionModAuto, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblMarca)
                    .addComponent(cmbMarcaModAuto, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblPatente)
                    .addComponent(txtPatenteModAuto, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblNumChasis)
                    .addComponent(txtNumChasisModAuto, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(FechCreacion)
                    .addComponent(txtFechaCreacion, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(FechUltDebito)
                    .addComponent(jcFechUltDebAuto, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblMoneda)
                    .addComponent(cmbMonedaModAuto, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblAño)
                    .addComponent(txtAñoModAuto, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblNumMotor)
                    .addComponent(txtNumMotorModiAuto, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(lblFechUltTasacion)
                    .addComponent(jcFechUltTasacAprobAuto, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(26, 26, 26))
        );

        lblTipoGarantia.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        lblTipoGarantia.setText("TIPO GARANTÍA");

        lblModelo.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        lblModelo.setText("MODELO");

        lblNumRegPrenda.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        lblNumRegPrenda.setText("N° REG. PRENDA");

        lblFechExtincion.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        lblFechExtincion.setText("FECHA EXTINCIÓN");

        lblFechUltRevaluo.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        lblFechUltRevaluo.setText("FECHA ÚLT. REVALUO");

        FechUltCredito.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        FechUltCredito.setText("FECHA ÚLT. CREDITO");

        lblFechModifica.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        lblFechModifica.setText("FECHA MODIFICA.");

        cmbTipoGarantiaModAuto.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "(SELECCIONE)" }));

        cmbModeloModiAuto.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "(SELECCIONE)" }));

        javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
        jPanel5.setLayout(jPanel5Layout);
        jPanel5Layout.setHorizontalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(lblFechUltRevaluo)
                    .addComponent(FechUltCredito)
                    .addComponent(lblFechExtincion)
                    .addComponent(lblModelo)
                    .addComponent(lblTipoGarantia)
                    .addComponent(lblNumRegPrenda)
                    .addComponent(lblFechModifica))
                .addGap(18, 18, 18)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jcFechModificaAprobAuto, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(txtNumRegPrendaModAuto)
                    .addComponent(jcFechUltRevaluoModAuto, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jcFechExtincionModAuto, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jcFechUltCreditoModAuto, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(cmbTipoGarantiaModAuto, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(cmbModeloModiAuto, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );
        jPanel5Layout.setVerticalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblTipoGarantia)
                    .addComponent(cmbTipoGarantiaModAuto, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblModelo)
                    .addComponent(cmbModeloModiAuto, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblNumRegPrenda)
                    .addComponent(txtNumRegPrendaModAuto, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addComponent(lblFechExtincion)
                    .addComponent(jcFechExtincionModAuto, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jcFechUltRevaluoModAuto, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblFechUltRevaluo, javax.swing.GroupLayout.Alignment.TRAILING))
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel5Layout.createSequentialGroup()
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jcFechUltCreditoModAuto, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel5Layout.createSequentialGroup()
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(FechUltCredito)))
                .addGap(6, 6, 6)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jcFechModificaAprobAuto, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblFechModifica))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jPanel9.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "ADJUNTAR ARCHIVO", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Century Gothic", 1, 10), java.awt.Color.blue)); // NOI18N

        lblArchivo.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        lblArchivo.setText("ARCHIVO");

        txtArchivoModiAuto.setEditable(false);

        btnExaminarModAuto.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        btnExaminarModAuto.setText("EXAMINAR");
        btnExaminarModAuto.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnExaminarModAutoActionPerformed(evt);
            }
        });

        btnAdjuntarModiAuto.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        btnAdjuntarModiAuto.setText("ADJUNTAR");
        btnAdjuntarModiAuto.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnAdjuntarModiAutoActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel9Layout = new javax.swing.GroupLayout(jPanel9);
        jPanel9.setLayout(jPanel9Layout);
        jPanel9Layout.setHorizontalGroup(
            jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel9Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(lblArchivo)
                .addGap(18, 18, 18)
                .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel9Layout.createSequentialGroup()
                        .addComponent(btnExaminarModAuto)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(btnAdjuntarModiAuto))
                    .addComponent(txtArchivoModiAuto, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel9Layout.setVerticalGroup(
            jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel9Layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblArchivo)
                    .addComponent(txtArchivoModiAuto, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnExaminarModAuto)
                    .addComponent(btnAdjuntarModiAuto))
                .addContainerGap())
        );

        javax.swing.GroupLayout pnlCreacionGaraAutoLayout = new javax.swing.GroupLayout(pnlCreacionGaraAuto);
        pnlCreacionGaraAuto.setLayout(pnlCreacionGaraAutoLayout);
        pnlCreacionGaraAutoLayout.setHorizontalGroup(
            pnlCreacionGaraAutoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlCreacionGaraAutoLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 114, Short.MAX_VALUE)
                .addGroup(pnlCreacionGaraAutoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jPanel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanel9, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );
        pnlCreacionGaraAutoLayout.setVerticalGroup(
            pnlCreacionGaraAutoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlCreacionGaraAutoLayout.createSequentialGroup()
                .addGroup(pnlCreacionGaraAutoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pnlCreacionGaraAutoLayout.createSequentialGroup()
                        .addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jPanel9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(0, 30, Short.MAX_VALUE))
        );

        btnMenuPricModAuto.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        btnMenuPricModAuto.setText("MENÚ PRINCIPAL >>");
        btnMenuPricModAuto.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnMenuPricModAutoActionPerformed(evt);
            }
        });

        btnActModAuto.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        btnActModAuto.setText("ACTUALIZAR");
        btnActModAuto.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnActModAutoActionPerformed(evt);
            }
        });

        jPanel11.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "ESTADO ACTUAL", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Century Gothic", 1, 10), java.awt.Color.blue)); // NOI18N

        txtEstadoActualAutomotriz.setEditable(false);

        javax.swing.GroupLayout jPanel11Layout = new javax.swing.GroupLayout(jPanel11);
        jPanel11.setLayout(jPanel11Layout);
        jPanel11Layout.setHorizontalGroup(
            jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel11Layout.createSequentialGroup()
                .addContainerGap(38, Short.MAX_VALUE)
                .addComponent(txtEstadoActualAutomotriz, javax.swing.GroupLayout.PREFERRED_SIZE, 74, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(38, 38, 38))
        );
        jPanel11Layout.setVerticalGroup(
            jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(txtEstadoActualAutomotriz, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
        );

        jPanelCambiandoEstadoActual.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "CAMBIANDO ESTADO ACTUAL", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Century Gothic", 1, 10), java.awt.Color.blue)); // NOI18N

        txtCambiandoEstadoActualAutomotriz.setEditable(false);
        txtCambiandoEstadoActualAutomotriz.setText("Modificando");

        javax.swing.GroupLayout jPanelCambiandoEstadoActualLayout = new javax.swing.GroupLayout(jPanelCambiandoEstadoActual);
        jPanelCambiandoEstadoActual.setLayout(jPanelCambiandoEstadoActualLayout);
        jPanelCambiandoEstadoActualLayout.setHorizontalGroup(
            jPanelCambiandoEstadoActualLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanelCambiandoEstadoActualLayout.createSequentialGroup()
                .addContainerGap(38, Short.MAX_VALUE)
                .addComponent(txtCambiandoEstadoActualAutomotriz, javax.swing.GroupLayout.PREFERRED_SIZE, 74, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(38, 38, 38))
        );
        jPanelCambiandoEstadoActualLayout.setVerticalGroup(
            jPanelCambiandoEstadoActualLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(txtCambiandoEstadoActualAutomotriz, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
        );

        javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
        jPanel4.setLayout(jPanel4Layout);
        jPanel4Layout.setHorizontalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(pnlCreacionGaraAuto, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup()
                        .addGap(0, 0, Short.MAX_VALUE)
                        .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup()
                                .addComponent(btnActModAuto)
                                .addGap(176, 176, 176)
                                .addComponent(btnMenuPricModAuto, javax.swing.GroupLayout.PREFERRED_SIZE, 157, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup()
                                .addComponent(jPanel11, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(31, 31, 31)
                                .addComponent(jPanelCambiandoEstadoActual, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))))
                .addContainerGap())
        );
        jPanel4Layout.setVerticalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel11, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jPanelCambiandoEstadoActual, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(pnlCreacionGaraAuto, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnActModAuto)
                    .addComponent(btnMenuPricModAuto))
                .addContainerGap())
        );

        jTabbedPane1.addTab("MODIFICACIÓN  GARANTÍA AUTOMOTRIZ", jPanel4);

        jPanel7.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "ÁREA IMPRESIÓN", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Century Gothic", 1, 10), java.awt.Color.blue)); // NOI18N

        tbSalidaImprimirPatente.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {

            }
        ));
        tbSalidaImprimirPatente.setEnabled(false);
        jScrollPane1.setViewportView(tbSalidaImprimirPatente);

        javax.swing.GroupLayout jPanel7Layout = new javax.swing.GroupLayout(jPanel7);
        jPanel7.setLayout(jPanel7Layout);
        jPanel7Layout.setHorizontalGroup(
            jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel7Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane1)
                .addContainerGap())
        );
        jPanel7Layout.setVerticalGroup(
            jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel7Layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 267, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(121, 121, 121))
        );

        jPanel10.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "INGRESE PATENTE", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Century Gothic", 1, 10), java.awt.Color.blue)); // NOI18N

        btnBuscarPatnteImprimir.setText("BUSCAR");
        btnBuscarPatnteImprimir.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnBuscarPatnteImprimirActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel10Layout = new javax.swing.GroupLayout(jPanel10);
        jPanel10.setLayout(jPanel10Layout);
        jPanel10Layout.setHorizontalGroup(
            jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel10Layout.createSequentialGroup()
                .addContainerGap(27, Short.MAX_VALUE)
                .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addComponent(btnBuscarPatnteImprimir, javax.swing.GroupLayout.DEFAULT_SIZE, 132, Short.MAX_VALUE)
                    .addComponent(txtBuscarPatenteImprimir))
                .addGap(27, 27, 27))
        );
        jPanel10Layout.setVerticalGroup(
            jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel10Layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(txtBuscarPatenteImprimir, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnBuscarPatnteImprimir))
        );

        btnImprimirPatente.setText("IMPRIMIR");
        btnImprimirPatente.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnImprimirPatenteActionPerformed(evt);
            }
        });

        btnMenuPrincipalAutomotriz.setText("MENÚ PRINCIPAL");
        btnMenuPrincipalAutomotriz.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnMenuPrincipalAutomotrizActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);
        jPanel6.setLayout(jPanel6Layout);
        jPanel6Layout.setHorizontalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel6Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel6Layout.createSequentialGroup()
                        .addComponent(jPanel7, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addContainerGap())
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel6Layout.createSequentialGroup()
                        .addGap(0, 281, Short.MAX_VALUE)
                        .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel6Layout.createSequentialGroup()
                                .addComponent(jPanel10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(306, 306, 306))
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel6Layout.createSequentialGroup()
                                .addComponent(btnImprimirPatente, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(190, 190, 190)
                                .addComponent(btnMenuPrincipalAutomotriz, javax.swing.GroupLayout.PREFERRED_SIZE, 137, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(25, 25, 25))))))
        );
        jPanel6Layout.setVerticalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel6Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jPanel7, javax.swing.GroupLayout.PREFERRED_SIZE, 311, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 17, Short.MAX_VALUE)
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnImprimirPatente)
                    .addComponent(btnMenuPrincipalAutomotriz))
                .addContainerGap())
        );

        jTabbedPane1.addTab("IMPRIMIR", jPanel6);

        jLabel1.setText("MENÚ PRINCIPAL\\MODIFICACIÓN GARANTÍA AUTOMOTRIZ");

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(lblLogo)
                        .addGap(114, 114, 114)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(lblIngresoGaraAuto)
                            .addComponent(jLabel1)))
                    .addComponent(jTabbedPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 800, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(lblIngresoGaraAuto)
                        .addGap(18, 18, 18)
                        .addComponent(jLabel1))
                    .addComponent(lblLogo))
                .addGap(18, 18, 18)
                .addComponent(jTabbedPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 497, javax.swing.GroupLayout.PREFERRED_SIZE))
        );

        setSize(new java.awt.Dimension(816, 638));
        setLocationRelativeTo(null);
    }// </editor-fold>//GEN-END:initComponents

    private void btnExaminarModAutoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnExaminarModAutoActionPerformed
         JFileChooser filechooser = new JFileChooser();
        int opcion = filechooser.showOpenDialog(this);
        if (opcion==JFileChooser.APPROVE_OPTION){
            txtArchivoModiAuto.setText(filechooser.getSelectedFile().getPath());
        }
    }//GEN-LAST:event_btnExaminarModAutoActionPerformed

    private void btnAdjuntarModiAutoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnAdjuntarModiAutoActionPerformed
        if(!this.txtArchivoModiAuto.getText().equals("")){
        garantiaAutomotrizDTO garaAuto = new garantiaAutomotrizDTO();
        garaAuto.setAdjuntar_auto(this.txtArchivoModiAuto.getText().trim());
        javax.swing.JOptionPane.showMessageDialog(this, "Archivo guardado");
        }else{
        javax.swing.JOptionPane.showMessageDialog(this, "Adjunte archivo");
        }
    }//GEN-LAST:event_btnAdjuntarModiAutoActionPerformed

    private void btnMenuPrincipalActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnMenuPrincipalActionPerformed
        MenuPrincipal venMenuPrincipal = new MenuPrincipal(user);
        venMenuPrincipal.setVisible(true);
        ModificacionGarantiaAutomotriz.this.dispose();
    }//GEN-LAST:event_btnMenuPrincipalActionPerformed

    private void btnFolioModiAutoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnFolioModiAutoActionPerformed
        limpiar();
        try{
            garantiaAutomotrizDTO modifiGaraAuto = reg.buscarPorFolioAuto(Integer.parseInt(this.txtFolioModiAuto.getText().trim()));
            if (modifiGaraAuto.getEstado_auto().equals("Eliminada"))
                {
                    javax.swing.JOptionPane.showMessageDialog(this, "Estado Garantía Eliminada");
                    this.btnActModAuto.setVisible(false);
                }else
            {
            if(this.txtFolioModiAuto.getText().length() > 0)
            {
            
            if (!this.txtFolioModiAuto.getText().matches("[ 0-9]*")) // expresiones regulares para validar
        {
            javax.swing.JOptionPane.showMessageDialog(this, "Ingrese solo números");
            this.txtFolioModiAuto.setText("");
            this.txtPatenteModiAuto.setText("");
            this.btnActModAuto.setVisible(false);
        }
        else
        {
       
        if(modifiGaraAuto.getFolio_garantia_auto() == 0)
        {
            javax.swing.JOptionPane.showMessageDialog(null, "Garantia NO ENCONTRADA");
            txtFolioModiAuto.setText("");
            this.txtPatenteModiAuto.setText("");
            this.btnActModAuto.setVisible(false);
        }
        else
        {
           
                if(modifiGaraAuto.getEstado_auto().equals("Ingresada"))
                {
                    javax.swing.JOptionPane.showMessageDialog(this, "Estado Garantía Ingresada");
                    this.btnActModAuto.setVisible(true);
                }
                else if(modifiGaraAuto.getEstado_auto().equals("Aprobada"))
                {
                    javax.swing.JOptionPane.showMessageDialog(this, "Estado Garantía Aprobada.NO PUEDE SER MODIFICADA");
                    this.btnActModAuto.setVisible(false);
                    this.jPanelCambiandoEstadoActual.setVisible(false);
                }
                else if(modifiGaraAuto.getEstado_auto().equals("Rechazada"))
                {
                    javax.swing.JOptionPane.showMessageDialog(this, "Estado Garantía Rechazada");
                    this.btnActModAuto.setVisible(true);
                }
                else if(modifiGaraAuto.getEstado_auto().equals("Modificada"))
                {
                    javax.swing.JOptionPane.showMessageDialog(this, "Estado Garantía Modificada");
                    this.btnActModAuto.setVisible(true);
                }
                
                
                this.txtRutModiAuto.setText(modifiGaraAuto.getRut_gara_auto());
                this.txtApellPatModiAuto.setText(modifiGaraAuto.getApell_paterno_auto());
                this.txtApellMatModiAuto.setText(modifiGaraAuto.getApell_paterno_auto());
                this.txtNombreModifiAuto.setText(modifiGaraAuto.getNombre_auto());
                this.txtDescripcionModiAuto.setText(modifiGaraAuto.getDescrip_auto());
                this.txtOtroComentarioModAuto.setText(modifiGaraAuto.getComent_auto());    
                this.txtDireccionModAuto.setText(modifiGaraAuto.getDireccion_auto());
                this.txtPatenteModAuto.setText(modifiGaraAuto.getPatente_auto());
                this.txtNumChasisModAuto.setText(modifiGaraAuto.getNum_chasis_auto());
                String fechaCreacion = (new SimpleDateFormat("dd-MM-yyyy").format(modifiGaraAuto.getFech_crea_auto()));
                txtFechaCreacion.setText(fechaCreacion);
                this.cmbMarcaModAuto.setSelectedItem(modifiGaraAuto.getMarca_auto().toString());
                this.cmbSucursalModAuto.setSelectedItem(modifiGaraAuto.getSucursal_auto().toString());
                this.cmbTipoGarantiaModAuto.setSelectedItem(modifiGaraAuto.getTipo_garantia_auto().toString());
                this.cmbModeloModiAuto.setSelectedItem(modifiGaraAuto.getModelo_auto().toString());
                this.cmbMonedaModAuto.setSelectedItem(modifiGaraAuto.getMoneda_auto().toString());
                this.jcFechUltDebAuto.setDate(modifiGaraAuto.getFech_ult_debito_auto());
                this.txtAñoModAuto.setText(String.valueOf(modifiGaraAuto.getAño_auto()));
                this.txtNumMotorModiAuto.setText(String.valueOf(modifiGaraAuto.getNum_motor_auto()));
                this.jcFechUltTasacAprobAuto.setDate(modifiGaraAuto.getFecha_ult_tasa_auto());
                this.txtNumRegPrendaModAuto.setText(String.valueOf(modifiGaraAuto.getNum_reg_prenda_auto()));
                this.jcFechExtincionModAuto.setDate(modifiGaraAuto.getFech_extincion_auto());
                this.jcFechUltRevaluoModAuto.setDate(modifiGaraAuto.getFech_ult_reval_auto());
                this.jcFechUltCreditoModAuto.setDate(modifiGaraAuto.getFech_ult_reval_credito_auto());
                this.jcFechModificaAprobAuto.setDate(modifiGaraAuto.getFecha_modifi_auto());
                this.txtEstadoActualAutomotriz.setText(modifiGaraAuto.getEstado_auto());
                this.txtPatenteModiAuto.setText("");
                
                
            
        }
        }
        }
        else
        {
           javax.swing.JOptionPane.showMessageDialog(this, "Ingrese Número de Folio");
           this.txtPatenteModiAuto.setText("");
        }
        }}
        catch(Exception e)
        {
            e.getMessage();
        }
    }//GEN-LAST:event_btnFolioModiAutoActionPerformed

    private void btnPatenteModiAutoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnPatenteModiAutoActionPerformed
        limpiar();
        try
        {
            garantiaAutomotrizDTO modifiGaraAuto = reg.buscarPorPatente(this.txtPatenteModiAuto.getText().trim());
            if (modifiGaraAuto.getEstado_auto().equals("Eliminada"))
                {
                    javax.swing.JOptionPane.showMessageDialog(this, "Estado Garantía Eliminada");
                    this.btnActModAuto.setVisible(false);
                }
            else
            {
            if(this.txtPatenteModiAuto.getText().length() > 0)
            {
            
            if(modifiGaraAuto.getFolio_garantia_auto() == 0)
            {
                javax.swing.JOptionPane.showMessageDialog(null, "Garantia NO ENCONTRADA");
                txtPatenteModAuto.setText("");
                this.txtFolioModiAuto.setText("");
                this.btnActModAuto.setVisible(false);
            }
            else
            {
                    if(modifiGaraAuto.getEstado_auto().equals("Ingresada"))
                {
                    javax.swing.JOptionPane.showMessageDialog(this, "Estado Garantía Ingresada");
                    this.btnActModAuto.setVisible(true);
                }
                else if(modifiGaraAuto.getEstado_auto().equals("Aprobada"))
                {
                    javax.swing.JOptionPane.showMessageDialog(this, "Estado Garantía Aprobada.NO PUEDE SER MODIFICADA");
                    this.btnActModAuto.setVisible(false);
                    this.jPanelCambiandoEstadoActual.setVisible(false);
                }
                else if(modifiGaraAuto.getEstado_auto().equals("Rechazada"))
                {
                    javax.swing.JOptionPane.showMessageDialog(this, "Estado Garantía Rechazada");
                    this.btnActModAuto.setVisible(true);
                }
                else if(modifiGaraAuto.getEstado_auto().equals("Modificada"))
                {
                    javax.swing.JOptionPane.showMessageDialog(this, "Estado Garantía Modificada");
                    this.btnActModAuto.setVisible(true);
                }
                
                
                this.txtRutModiAuto.setText(modifiGaraAuto.getRut_gara_auto());
                this.txtApellPatModiAuto.setText(modifiGaraAuto.getApell_paterno_auto());
                this.txtApellMatModiAuto.setText(modifiGaraAuto.getApell_paterno_auto());
                this.txtNombreModifiAuto.setText(modifiGaraAuto.getNombre_auto());
                this.txtDescripcionModiAuto.setText(modifiGaraAuto.getDescrip_auto());
                this.txtOtroComentarioModAuto.setText(modifiGaraAuto.getComent_auto());    
                this.txtDireccionModAuto.setText(modifiGaraAuto.getDireccion_auto());
                this.txtPatenteModAuto.setText(modifiGaraAuto.getPatente_auto());
                this.txtNumChasisModAuto.setText(modifiGaraAuto.getNum_chasis_auto());
                String fechaCreacion = (new SimpleDateFormat("dd-MM-yyyy").format(modifiGaraAuto.getFech_crea_auto()));
                txtFechaCreacion.setText(fechaCreacion);
                this.cmbMarcaModAuto.setSelectedItem(modifiGaraAuto.getMarca_auto().toString());
                this.cmbSucursalModAuto.setSelectedItem(modifiGaraAuto.getSucursal_auto().toString());
                this.cmbTipoGarantiaModAuto.setSelectedItem(modifiGaraAuto.getTipo_garantia_auto().toString());
                this.cmbModeloModiAuto.setSelectedItem(modifiGaraAuto.getModelo_auto().toString());
                this.cmbMonedaModAuto.setSelectedItem(modifiGaraAuto.getMoneda_auto().toString());
                this.jcFechUltDebAuto.setDate(modifiGaraAuto.getFech_ult_debito_auto());
                this.txtAñoModAuto.setText(String.valueOf(modifiGaraAuto.getAño_auto()));
                this.txtNumMotorModiAuto.setText(String.valueOf(modifiGaraAuto.getNum_motor_auto()));
                this.jcFechUltTasacAprobAuto.setDate(modifiGaraAuto.getFecha_ult_tasa_auto());
                this.txtNumRegPrendaModAuto.setText(String.valueOf(modifiGaraAuto.getNum_reg_prenda_auto()));
                this.jcFechExtincionModAuto.setDate(modifiGaraAuto.getFech_extincion_auto());
                this.jcFechUltRevaluoModAuto.setDate(modifiGaraAuto.getFech_ult_reval_auto());
                this.jcFechUltCreditoModAuto.setDate(modifiGaraAuto.getFech_ult_reval_credito_auto());
                this.jcFechModificaAprobAuto.setDate(modifiGaraAuto.getFecha_modifi_auto());
                this.txtEstadoActualAutomotriz.setText(modifiGaraAuto.getEstado_auto());
                this.txtFolioModiAuto.setText("");
                



            }
            }
            else
            {
                javax.swing.JOptionPane.showMessageDialog(this, "Ingrese Patente");
                this.txtFolioModiAuto.setText("");
            }
            }}catch(Exception e)
            {
            e.getMessage();
            }
    }//GEN-LAST:event_btnPatenteModiAutoActionPerformed

    private void btnActModAutoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnActModAutoActionPerformed
        try{
             if(validacion()<1)
            {
        garantiaAutomotrizDTO garaAuto = new garantiaAutomotrizDTO();
        
        garaAuto.setRut_gara_auto(this.txtRutModiAuto.getText().trim());
        garaAuto.setApell_paterno_auto(this.txtApellPatModiAuto.getText().trim());
        garaAuto.setApell_materno_auto(this.txtApellMatModiAuto.getText().trim());
        garaAuto.setNombre_auto(this.txtNombreModifiAuto.getText().trim());
        garaAuto.setDescrip_auto(this.txtDescripcionModiAuto.getText().trim());
        garaAuto.setComent_auto(this.txtOtroComentarioModAuto.getText().trim());
        garaAuto.setSucursal_auto(this.cmbSucursalModAuto.getSelectedItem().toString());
        garaAuto.setDireccion_auto(this.txtDireccionModAuto.getText().trim());
        garaAuto.setMarca_auto(this.cmbMarcaModAuto.getSelectedItem().toString());
        garaAuto.setPatente_auto(this.txtPatenteModAuto.getText().trim());
        garaAuto.setNum_chasis_auto(this.txtNumChasisModAuto.getText().trim());
        Date fechaCreacion = (new SimpleDateFormat("dd-MM-yyyy").parse(txtFechaCreacion.getText()));
        garaAuto.setFech_crea_auto(fechaCreacion);
        garaAuto.setFech_ult_debito_auto(new Date(jcFechUltDebAuto.getDate().getTime()));
        garaAuto.setMoneda_auto(this.cmbMonedaModAuto.getSelectedItem().toString());
        garaAuto.setAño_auto(Integer.parseInt(this.txtAñoModAuto.getText().trim()));
        garaAuto.setNum_motor_auto(Integer.parseInt(this.txtNumMotorModiAuto.getText().trim()));
        garaAuto.setFecha_ult_tasa_auto(new Date(jcFechUltTasacAprobAuto.getDate().getTime()));
        garaAuto.setFecha_modifi_auto(new Date(jcFechModificaAprobAuto.getDate().getTime()));
        garaAuto.setTipo_garantia_auto(this.cmbTipoGarantiaModAuto.getSelectedItem().toString());
        garaAuto.setModelo_auto(this.cmbModeloModiAuto.getSelectedItem().toString());
        garaAuto.setNum_reg_prenda_auto(Integer.parseInt(this.txtNumRegPrendaModAuto.getText().toString()));
        garaAuto.setFech_extincion_auto(new Date(jcFechExtincionModAuto.getDate().getTime()));
        garaAuto.setFech_ult_reval_auto(new Date(jcFechUltRevaluoModAuto.getDate().getTime()));
        garaAuto.setFech_ult_reval_credito_auto(new Date(jcFechUltCreditoModAuto.getDate().getTime()));
        garaAuto.setAdjuntar_auto(this.txtArchivoModiAuto.getText().trim());
        String estado = this.txtCambiandoEstadoActualAutomotriz.getText();
        String modificada = estado.replaceFirst(estado, "Modificada");
        garaAuto.setEstado_auto(modificada);
        
        int respuesta = javax.swing.JOptionPane.showConfirmDialog(null, "Esta seguro de modificar esta Garantia ?", "Actualizar Datos", JOptionPane.OK_CANCEL_OPTION);
        if (respuesta == 0) {
            reg.modificarGtiaAutomotrizPorPatente(garaAuto, user);
            javax.swing.JOptionPane.showMessageDialog(this, "Garantia Automotriz modificada con Exito");
            MenuPrincipal venMenuPrincipal = new MenuPrincipal(user);
            venMenuPrincipal.setVisible(true);
            ModificacionGarantiaAutomotriz.this.dispose();
        }
        }
        }catch(Exception e)
        {
            e.getMessage();
            javax.swing.JOptionPane.showMessageDialog(this, "Aun no ha sido Aprobado");
        }
    
        
    }//GEN-LAST:event_btnActModAutoActionPerformed

    private void btnMenuPricModAutoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnMenuPricModAutoActionPerformed
        MenuPrincipal venMenuPrincipal = new MenuPrincipal(user);
        venMenuPrincipal.setVisible(true);
        ModificacionGarantiaAutomotriz.this.dispose();
    }//GEN-LAST:event_btnMenuPricModAutoActionPerformed

    private void chkFolioModiAutoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chkFolioModiAutoActionPerformed
        if (chkFolioModiAuto.isSelected()) {
            pnlBuscarFolio.setVisible(true);
            pnlBuscarPatente.setVisible(false);
        }
        else {
            pnlBuscarFolio.setVisible(false);
        }
    }//GEN-LAST:event_chkFolioModiAutoActionPerformed

    private void chkPatenteModiAutoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chkPatenteModiAutoActionPerformed
        if (chkPatenteModiAuto.isSelected()) {
            pnlBuscarPatente.setVisible(true);
            pnlBuscarFolio.setVisible(false);
        }
        else {
            pnlBuscarPatente.setVisible(false);
        }
    }//GEN-LAST:event_chkPatenteModiAutoActionPerformed

    private void btnBuscarPatnteImprimirActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnBuscarPatnteImprimirActionPerformed
        try
         {
             garantiaAutomotrizDTO modifiGaraAuto = reg.buscarPorPatente(this.txtBuscarPatenteImprimir.getText().trim());
            if (modifiGaraAuto.getEstado_auto().equals("Eliminada"))
                {
                    javax.swing.JOptionPane.showMessageDialog(this, "Estado Garantía Eliminada");
                    this.txtBuscarPatenteImprimir.setText(null);
                 DefaultTableModel model = (DefaultTableModel)this.tbSalidaImprimirPatente.getModel();
                 model.setNumRows(0);
                 model.setColumnCount(0);
                }
            else
            {
             ArrayList<garantiaAutomotrizDTO> salida = reg.ListarPorPatenteAuto(this.txtBuscarPatenteImprimir.getText().trim());
             if(salida.isEmpty())
             {
                
                 this.txtBuscarPatenteImprimir.setText(null);
                 DefaultTableModel model = (DefaultTableModel)this.tbSalidaImprimirPatente.getModel();
                 model.setNumRows(0);
                 javax.swing.JOptionPane.showMessageDialog(this, "No hay garantias registradas!");
             }else
             {
                 
                 DefaultTableModel model = (DefaultTableModel)this.tbSalidaImprimirPatente.getModel();
                 model.setColumnCount(0);
                 
                 if(model.getColumnCount() < 1)
                {
                    
                    Object[] arr1 ={"Rut: ","Nombre: ", "Calle: ", "Garantía: ", "Número identificatorio Automotriz: ",
                        "Número de folio: ", "Monto incial: ", "Creación de la garantía: ", "Sucursal:  ",
                        "Dirección (Crédito): ","Marca: ","Número de Chasis: ","Fecha ultimo debito",
                        "Moneda: ","Año: ","Número de Motor: ","Fecha última Tasación: ","Tipo garantía: ",
                        "Modelo: ","Número Regsitro de Prenda: ","Fecha vencimiento: ","Fecha último revaluo: ",
                        "Fecha último crédito: ","Estado de la garantía: ","Fecha Aprobado/Rechazo: ","Fecha de modificación: ","Usuario: " };
                    model.addColumn("Concepto", arr1);
                    
                    for(garantiaAutomotrizDTO a: salida)
                {
                    if(a.getFecha_modifi_auto() == null)
                    {
                       fechaModi = "";
                    }
                    else
                    {
                       fechaModi = new SimpleDateFormat("dd-MM-yyyy").format(a.getFecha_modifi_auto());
                    }
                    Object[] arr2 ={
                         a.getRut_gara_auto(),
                         a.getNombre_auto() + "  " + a.getApell_paterno_auto() + "  " + a.getApell_materno_auto(),
                         a.getCalle_auto() + "  " + a.getNum_auto(),
                         a.getNombre_garantia_auto(),
                         a.getPatente_auto(),
                         a.getFolio_garantia_auto(),
                         a.getMonto_inicial(),
                         new SimpleDateFormat("dd-MM-yyyy").format(a.getFech_crea_auto()),
                         a.getSucursal_auto(),
                         a.getDireccion_auto(),a.getMarca_auto(),a.getNum_chasis_auto(),new SimpleDateFormat("dd-MM-yyyy").format(a.getFech_ult_debito_auto()),
                         a.getMoneda_auto(),a.getAño_auto(),a.getNum_motor_auto(),new SimpleDateFormat("dd-MM-yyyy").format(a.getFecha_ult_tasa_auto()),
                         a.getTipo_garantia_auto(),a.getModelo_auto(),a.getNum_reg_prenda_auto(),new SimpleDateFormat("dd-MM-yyyy").format(a.getFech_extincion_auto()),
                         new SimpleDateFormat("dd-MM-yyyy").format(a.getFech_ult_reval_auto()),new SimpleDateFormat("dd-MM-yyyy").format(a.getFech_ult_reval_credito_auto()),
                         a.getEstado_auto(),
                         new SimpleDateFormat("dd-MM-yyyy").format(a.getFech_crea_auto()),
                         fechaModi,
                         a.getNombre_usuario()
                    };
                     
                    model.addColumn("Contenido",arr2);    
                }
                    
                    Object[] arr3 = {" "," "," "," "," "," "," "," "," "," ",
                                     " "," "," "," "," "," "," "," "," "," ",
                                     " "," "," "," "," "," "," "};
                    model.addColumn("Observaciones",arr3);
                    
                }

             }
         }}
         catch(Exception e)
         {
             e.getMessage();
         }
    }//GEN-LAST:event_btnBuscarPatnteImprimirActionPerformed

    private void btnImprimirPatenteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnImprimirPatenteActionPerformed
        try {
            
        int fila= 0;
  
        List Resultados = new ArrayList();
        ComprobanteGeneralDTO tipo;
        Resultados.clear();
        
        for(fila = 0; fila< tbSalidaImprimirPatente.getRowCount(); fila++)
        {
            
           tipo = new ComprobanteGeneralDTO(String.valueOf(tbSalidaImprimirPatente.getValueAt(fila, 0)),
                    " " + String.valueOf(tbSalidaImprimirPatente.getValueAt(fila, 1)), " " + String.valueOf(tbSalidaImprimirPatente.getValueAt(fila, 2))  + "\n");
           Resultados.add(tipo);

        }
        
            String reportSource = "C:\\Users\\SoftGroup\\Documents\\NetBeansProjects\\trunk\\AppGarantias\\build\\classes\\Reporte\\ComprobanteGeneralGarantias.jrxml";

            JasperReport jr = JasperCompileManager.compileReport(reportSource);
            
            
            JFrame reporte = new JFrame();
            reporte.setSize(900, 700);
            reporte.setLocationRelativeTo(null);
            reporte.setTitle("IMPRESIÓN");
            String fechaImpresion = String.valueOf(Fechas.FechaSistema());
            
            Map<String, Object> map = new HashMap<String, Object>();
            
            map.put("Titulo", "Sistema Gestión de Garantías Bancarias");
            map.put("fecha", fechaImpresion);
            map.put("nombreBanco", "Banco xxxxxx");
            map.put("subtitulo", "Comprobante Modificación Automotriz");
            map.put("timbre", "Timbre");
            map.put("fechaUsuario","Fecha");
            map.put("firma","Firma");
            
            
            JRBeanCollectionDataSource coleccion = new JRBeanCollectionDataSource(Resultados);
            JasperPrint jp = JasperFillManager.fillReport(jr, map, coleccion);
            JRViewer jv = new JRViewer(jp);
            reporte.getContentPane().add(jv);
            reporte.setVisible(true);
            
            
            
        } catch (JRException e) {
            e.printStackTrace();
            Logger.getLogger(ModificacionGarantiaAutomotriz.class.getName()).log(Level.SEVERE, null, e);
        }
    }//GEN-LAST:event_btnImprimirPatenteActionPerformed

    private void btnMenuPrincipalAutomotrizActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnMenuPrincipalAutomotrizActionPerformed
       MenuPrincipal venMenuPrincipal = new MenuPrincipal(user);
        venMenuPrincipal.setVisible(true);
        ModificacionGarantiaAutomotriz.this.dispose();
    }//GEN-LAST:event_btnMenuPrincipalAutomotrizActionPerformed
    /**
     * @param args the command line arguments
     */
//    public static void main(String args[]) {
//        /*
//         * Set the Nimbus look and feel
//         */
//        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
//        /*
//         * If Nimbus (introduced in Java SE 6) is not available, stay with the
//         * default look and feel. For details see
//         * http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
//         */
//        try {
//            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
//                if ("Nimbus".equals(info.getName())) {
//                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
//                    break;
//                }
//            }
//        } catch (ClassNotFoundException ex) {
//            java.util.logging.Logger.getLogger(ModificacionGarantiaAutomotriz.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
//        } catch (InstantiationException ex) {
//            java.util.logging.Logger.getLogger(ModificacionGarantiaAutomotriz.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
//        } catch (IllegalAccessException ex) {
//            java.util.logging.Logger.getLogger(ModificacionGarantiaAutomotriz.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
//        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
//            java.util.logging.Logger.getLogger(ModificacionGarantiaAutomotriz.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
//        }
//        //</editor-fold>
//
//        /*
//         * Create and display the form
//         */
//        java.awt.EventQueue.invokeLater(new Runnable() {
//
//            public void run() {
//                new ModificacionGarantiaAutomotriz().setVisible(true);
//            }
//        });
//    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel FechCreacion;
    private javax.swing.JLabel FechUltCredito;
    private javax.swing.JLabel FechUltDebito;
    private javax.swing.JButton btnActModAuto;
    private javax.swing.JButton btnAdjuntarModiAuto;
    private javax.swing.JButton btnBuscarPatnteImprimir;
    private javax.swing.JButton btnExaminarModAuto;
    private javax.swing.JButton btnFolioModiAuto;
    private javax.swing.JButton btnImprimirPatente;
    private javax.swing.JButton btnMenuPricModAuto;
    private javax.swing.JButton btnMenuPrincipal;
    private javax.swing.JButton btnMenuPrincipalAutomotriz;
    private javax.swing.JButton btnPatenteModiAuto;
    private javax.swing.ButtonGroup buttonGroup1;
    private javax.swing.JCheckBox chkFolioModiAuto;
    private javax.swing.JCheckBox chkPatenteModiAuto;
    private javax.swing.JComboBox cmbMarcaModAuto;
    private javax.swing.JComboBox cmbModeloModiAuto;
    private javax.swing.JComboBox cmbMonedaModAuto;
    private javax.swing.JComboBox cmbSucursalModAuto;
    private javax.swing.JComboBox cmbTipoGarantiaModAuto;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel30;
    private javax.swing.JLabel jLabel31;
    private javax.swing.JLabel jLabel36;
    private javax.swing.JLabel jLabel37;
    private javax.swing.JLabel jLabel39;
    private javax.swing.JLabel jLabel40;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel10;
    private javax.swing.JPanel jPanel11;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JPanel jPanel5;
    private javax.swing.JPanel jPanel6;
    private javax.swing.JPanel jPanel7;
    private javax.swing.JPanel jPanel8;
    private javax.swing.JPanel jPanel9;
    private javax.swing.JPanel jPanelCambiandoEstadoActual;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane3;
    private javax.swing.JScrollPane jScrollPane4;
    private javax.swing.JTabbedPane jTabbedPane1;
    private com.toedter.calendar.JDateChooser jcFechExtincionModAuto;
    private com.toedter.calendar.JDateChooser jcFechModificaAprobAuto;
    private com.toedter.calendar.JDateChooser jcFechUltCreditoModAuto;
    private com.toedter.calendar.JDateChooser jcFechUltDebAuto;
    private com.toedter.calendar.JDateChooser jcFechUltRevaluoModAuto;
    private com.toedter.calendar.JDateChooser jcFechUltTasacAprobAuto;
    private javax.swing.JLabel lblArchivo;
    private javax.swing.JLabel lblAño;
    private javax.swing.JLabel lblDescripcion;
    private javax.swing.JLabel lblDireccion;
    private javax.swing.JLabel lblFechExtincion;
    private javax.swing.JLabel lblFechModifica;
    private javax.swing.JLabel lblFechUltRevaluo;
    private javax.swing.JLabel lblFechUltTasacion;
    private javax.swing.JLabel lblIngresoGaraAuto;
    private javax.swing.JLabel lblLogo;
    private javax.swing.JLabel lblMarca;
    private javax.swing.JLabel lblModelo;
    private javax.swing.JLabel lblMoneda;
    private javax.swing.JLabel lblNumChasis;
    private javax.swing.JLabel lblNumMotor;
    private javax.swing.JLabel lblNumRegPrenda;
    private javax.swing.JLabel lblPatente;
    private javax.swing.JLabel lblSucursal;
    private javax.swing.JLabel lblTipoGarantia;
    private javax.swing.JPanel pnlBuscarFolio;
    private javax.swing.JPanel pnlBuscarPatente;
    private javax.swing.JPanel pnlCreacionGaraAuto;
    private javax.swing.JPanel pnlDatosPersoGara;
    private javax.swing.JPanel pnlDescripGarantia;
    private javax.swing.JTable tbSalidaImprimirPatente;
    private javax.swing.JTextField txtApellMatModiAuto;
    private javax.swing.JTextField txtApellPatModiAuto;
    private javax.swing.JTextField txtArchivoModiAuto;
    private javax.swing.JTextField txtAñoModAuto;
    private javax.swing.JTextField txtBuscarPatenteImprimir;
    private javax.swing.JTextField txtCambiandoEstadoActualAutomotriz;
    private javax.swing.JTextArea txtDescripcionModiAuto;
    private javax.swing.JTextField txtDireccionModAuto;
    private javax.swing.JTextField txtEstadoActualAutomotriz;
    private javax.swing.JTextField txtFechaCreacion;
    private javax.swing.JTextField txtFolioModiAuto;
    private javax.swing.JTextField txtNombreModifiAuto;
    private javax.swing.JTextField txtNumChasisModAuto;
    private javax.swing.JTextField txtNumMotorModiAuto;
    private javax.swing.JTextField txtNumRegPrendaModAuto;
    private javax.swing.JTextArea txtOtroComentarioModAuto;
    private javax.swing.JTextField txtPatenteModAuto;
    private javax.swing.JTextField txtPatenteModiAuto;
    private javax.swing.JTextField txtRutModiAuto;
    // End of variables declaration//GEN-END:variables

    private void limpiar() {
            this.txtRutModiAuto.setText(null);
            this.txtApellPatModiAuto.setText(null);
            this.txtApellMatModiAuto.setText(null);
            this.txtNombreModifiAuto.setText(null);
            this.txtDescripcionModiAuto.setText(null);
            this.txtOtroComentarioModAuto.setText(null);
            this.cmbSucursalModAuto.setSelectedItem("(SELECCIONE)");
            this.txtDireccionModAuto.setText(null);
            this.cmbMarcaModAuto.setSelectedItem("(SELECCIONE)");
            this.txtPatenteModAuto.setText(null);
            this.txtNumChasisModAuto.setText(null);
            this.txtFechaCreacion.setText(null);
            this.jcFechUltDebAuto.setCalendar(null);
            this.cmbMonedaModAuto.setSelectedItem("(SELECCIONE)");
            this.txtAñoModAuto.setText(null);
            this.txtNumMotorModiAuto.setText(null);
            this.jcFechUltTasacAprobAuto.setCalendar(null);
            this.jcFechModificaAprobAuto.setCalendar(null);
            this.cmbTipoGarantiaModAuto.setSelectedItem("(SELECCIONE)");
            this.cmbModeloModiAuto.setSelectedItem("(SELECCIONE)");
            this.txtNumRegPrendaModAuto.setText(null);     
            this.jcFechExtincionModAuto.setCalendar(null);
            this.jcFechUltRevaluoModAuto.setCalendar(null);
            this.jcFechUltCreditoModAuto.setCalendar(null);
            this.txtEstadoActualAutomotriz.setText(null);
    }

    private int validacion() {
            int contador = 0;
//            if(this.txtFolioModificarAuto.getText().length() == 0)
//            {
//                javax.swing.JOptionPane.showMessageDialog(this, "FALTA Nº DE FOLIO");
//                 contador++;
//            }
            if(this.txtApellPatModiAuto.getText().length() == 0)
            {
                javax.swing.JOptionPane.showMessageDialog(this, "FALTA APELLIDO PATERNO");
                contador++;
            }
            if(this.txtApellMatModiAuto.getText().length() == 0)
            {
                javax.swing.JOptionPane.showMessageDialog(this, "FALTA APELLIDO MATERNO");
                contador++;
            }
            if(this.txtNombreModifiAuto.getText().length() == 0)
            {
                javax.swing.JOptionPane.showMessageDialog(this, "FALTA NOMBRE");
                contador++;
            }
            if(this.txtDescripcionModiAuto.getText().length() == 0)
            {
                javax.swing.JOptionPane.showMessageDialog(this, "FALTA DESCRIPCIÓN");
                contador++;
            }           
            if(this.cmbSucursalModAuto.getSelectedIndex() == 0)
            {
                javax.swing.JOptionPane.showMessageDialog(this, "SELECCIONE SUCURSAL");
                contador++;
            }
            if(this.txtDireccionModAuto.getText().length() == 0)
            {
                javax.swing.JOptionPane.showMessageDialog(this, "INGRESE DIRECCIÓN (CREDITO)");
                contador++;
            }
            if(this.cmbMarcaModAuto.getSelectedIndex() == 0)
            {
                javax.swing.JOptionPane.showMessageDialog(this, "SELECCIONE MARCA");
                contador++;
            }
            if(this.txtPatenteModAuto.getText().length() == 0)
            {
                javax.swing.JOptionPane.showMessageDialog(this, "INGRESE PATENTE");
                contador++;
            }
            if(this.txtNumChasisModAuto.getText().length() == 0)
            {
                javax.swing.JOptionPane.showMessageDialog(this, "INGRESE Nº CHASIS");
                contador++;
            }
            if(this.txtFechaCreacion.getText().length() == 0)
            {
                javax.swing.JOptionPane.showMessageDialog(this, "INGRESE FECHA CREACIÓN");
                contador++;
            }
            if(this.jcFechUltDebAuto.getDate() == null)
            {
                javax.swing.JOptionPane.showMessageDialog(this, "INGRESE FECHA ÚLT. DEBITO");
                contador++;
            }
            if(this.cmbMonedaModAuto.getSelectedIndex() == 0)
            {
                javax.swing.JOptionPane.showMessageDialog(this, "INGRESE MONEDA");  
                contador++;
            }
            if(this.txtAñoModAuto.getText().length() == 0)
            {
                javax.swing.JOptionPane.showMessageDialog(this, "INGRESE AÑO");
                contador++;
            }
            if(this.txtNumMotorModiAuto.getText().length() == 0)
            {
                javax.swing.JOptionPane.showMessageDialog(this, "INGRESE Nº MOTOR");
                contador++;
            }
            if(this.jcFechUltTasacAprobAuto.getDate() == null)
            {
                javax.swing.JOptionPane.showMessageDialog(this, "INGRESE FECHA ÚLT. TASACIÓN");
                contador++;
            }
            if(this.jcFechModificaAprobAuto.getDate() == null)
            {
                javax.swing.JOptionPane.showMessageDialog(this, "INGRESE FECHA MODIFICA");
                contador++;
            }
            if(this.cmbTipoGarantiaModAuto.getSelectedIndex() == 0)
            {
                 javax.swing.JOptionPane.showMessageDialog(this, "INGRESE TIPO GARANTÍA");  
                 contador++;
            }
            if(this.cmbModeloModiAuto.getSelectedIndex() == 0)
            {
                javax.swing.JOptionPane.showMessageDialog(this, "INGRESE MODELO");  
                contador++;
            }
            if(this.txtNumRegPrendaModAuto.getText().length() == 0)
            {
                javax.swing.JOptionPane.showMessageDialog(this, "INGRESE N° REG. PRENDA");  
                contador++;
            }
            if(this.jcFechExtincionModAuto.getDate() == null)
            {
                javax.swing.JOptionPane.showMessageDialog(this, "INGRESE FECHA EXTINCIÓN");
                contador++;
            }
            if(this.jcFechUltRevaluoModAuto.getDate() == null)
            {
                javax.swing.JOptionPane.showMessageDialog(this, "INGRESE FECHA ÚLT. REVALUO");
                contador++;
            }
            if(this.jcFechUltCreditoModAuto.getDate() == null)
            {
                javax.swing.JOptionPane.showMessageDialog(this, "INGRESE FECHA ÚLT. CREDITO");
                contador++;
            }   
              return contador;
    }
}
